package main

import "fmt"

func f11(s []map[string]int) {
	for _, v := range s {
		v["age"] = v["age"] + 1
	}
}

func main() {
	var m = make(map[string][]map[string]int)
	data := make([]map[string]int, 0)
	data = append(data, map[string]int{
		"age": 1,
	})
	data = append(data, map[string]int{
		"age": 2,
	})
	data = append(data, map[string]int{
		"age": 3,
	})
	m["state"] = data

	s := make([]map[string]int, 0)
	for _, v := range m["state"] {
		s = append(s, v)
	}
	f11(s)
	fmt.Println(m) // map[state:[map[age:2] map[age:3] map[age:4]]]
}

// map是一个指针，赋值也是拷贝一个指针
